extends "../luyijiushi-1/luyijiushi-1.gd"


func _extInit():
	._extInit()
	lv = 2             #等级的设置
	addSkill("每次炮击有30%概率追加一次炮击", "连续射击")

func normalAtkChara(tcha):
	if sys.rndPer(p2):
		normalAtkChara(tcha)
		if lv > 2:
			delayYx()
	.normalAtkChara(tcha)

var p2 = 30
var p3 = 1
#延迟引信
func delayYx():
	for i in utils.getRndEnemys(self, 2):
		castBuff(i, b_delayYx.new())

class b_delayYx:
	extends "../../../azurlane_ctrl/AzurBuff.gd"
	var p = 1
	func _init():
		attInit()
		id = "b_delayYx"	
		isNegetive = true
		buffName = "延迟引信"
		dispel = 2
	func _connect():
		if casCha.upgraded == 2:
			p = 1.5
	var index = 0
	func _upS():
		index += 1
		if masCha.isDeath or casCha.isDeath:isDel = true
		if index >= 5:
			casCha.castBuff(masCha, buff.b_shaoShi.new(6))
			casCha.azurHurtChara(masCha, casCha.att.atk * 2, sys.HurtType.WEAPON, sys.AtkType.SKILL, "延迟引信", false, p)
			isDel = true